namespace EyeOpen.Domain
{
	using System;
	using System.Collections.Generic;
	using System.ComponentModel.DataAnnotations;

	using EyeOpen.DataAnnotations;

	[MetadataType(typeof(CustomerMetadata))]
	public class Customer
		: Entity<Guid>, ICustomer
	{
		private readonly IList<Order> orderList;

		public Customer(string dependency)
		{
			orderList = new List<Order>();
		}

		protected Customer()
		{
		}

		public virtual string Name { get; set; }

		public virtual IEnumerable<Order> OrderList
		{
			get
			{
				return orderList;
			}
		}

		public virtual void AddOrder(Order order)
		{
			orderList.Add(order);
		}
	}
}